package com.xy.breakfast.mapper;


import com.xy.breakfast.entity.Admin;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;

@Mapper
public interface AdminMapper extends BaseMapper<Admin>{
    public Admin getById(int id);

    public void save(Admin t);

    public void deleteById(int id);

    public void update(Admin t);

    //通过用户名寻找数据
    @Select("select * from admin where username=#{username}")
    public Admin findByUsername(String username);

    public List<Admin> getAll();

    public List<Admin> getPage(int start,int end);
}
